﻿using FluentValidation.Attributes;
using Nop.Admin.Validators.Orders;
using Nop.Services.Logistics;
using Nop.Web.Framework;
using System.Collections.Generic;
using System.Web.Mvc;

namespace Nop.Admin.Models.Orders
{
    [Validator(typeof(ShipmentPackageValidator))]
    public class ShipmentPackageModel
    {
        public ShipmentPackageModel()
        {
            AvaliableDimensionMeasure = new List<SelectListItem>();
            AvaliableWeightMeasure = new List<SelectListItem>();
            Products = new List<ShipmentModel.ShipmentOrderProductVariantModel>();
        }

        //public bool IsLetterSize { get; set; }
        public int SpotshubPackageSize { get; set; }
        [NopResourceDisplayName("Admin.Logistics.Common.Fields.PackageId")]
        public int? PackageId { get; set; }
        [NopResourceDisplayName("Admin.Logistics.Update.DimensionAndWeight")]
        public bool UpdateDimensionAndWeightInfo { get; set; }
        public bool IsAddingServiceFee { get; set; }
        public bool IsVertical { get; set; }
        public bool IsDangerous { get; set; }
        public bool IsFragile { get; set; }

        [NopResourceDisplayName("Logistics.Order.Length")]
        public decimal Length { get; set; }

        [NopResourceDisplayName("Logistics.Order.Width")]
        public decimal Width { get; set; }

        [NopResourceDisplayName("Logistics.Order.Height")]
        public decimal Height { get; set; }
        public int DimensionMeasureId { get; set; }
        public IList<SelectListItem> AvaliableDimensionMeasure { get; set; }

        [NopResourceDisplayName("Logistics.Order.Weight")]
        public decimal Weight { get; set; }
        public int WeightMeasureId { get; set; }
        public IList<SelectListItem> AvaliableWeightMeasure { get; set; }

        public decimal MaxDimensionSize { get; set; }
        public decimal MaxSingleDimensionSize { get; set; }
        public decimal MaxWeight { get; set; }

        [NopResourceDisplayName("Logistics.Order.Comment")]
        public string Comment { get; set; }
        public int MaxCommentLength { get; set; }

        //public ChargeRule ChargeRule { get; set; }

        //public int CurrentOversizeCount { get; set; }
        //public int CurrentTotalPackageCount { get; set; }
        //public decimal CurrentTotalWeight { get; set; }
        //public decimal CurrentTotalAddtionalCharge { get; set; }

        public decimal Cost { get; set; }

        public List<ShipmentModel.ShipmentOrderProductVariantModel> Products { get; set; }
    }
}   